package TestCTR;

import java.util.ArrayList;

import org.junit.Test;
import CTRLayer.*;
import ModelLayer.*;

public class TestRegistrationSchemaCTR
{
	private RegistrationSchemaCTR rsc = new RegistrationSchemaCTR();
	private RegistrationSchema rs = new RegistrationSchema();
	
	@Test
	public void testFindAllRegistrationSchemas() {
		ArrayList<RegistrationSchema> rsclist = rsc.findAllRegistrationSchemas();
		int id = 0;
		System.out.println("\nElementer i RegistrationSchema : " + rsclist.size() + "\n");
		while (id < rsclist.size())
		{
			System.out.println("RegistrationSchemaID : " + rsclist.get(id).getRegistrationSchemaID());
			System.out.println("Registration         : " + rsclist.get(id).getRegistration());
			System.out.println("Right                : " + rsclist.get(id).getPmRight());
			System.out.println("Promot               : " + rsclist.get(id).getPmPrompt());
			System.out.println("Wrong                : " + rsclist.get(id).getPmWrong());
			System.out.println("-------------------------------------------------");
			id++;
		}
	}

	@Test
	public void testFindRegistrationSchemaID() {
		int id = 1;
		rs = rsc.findRegistrationSchemaID(id);
		System.out.println("RegistrationSchemaID : " + id);
		System.out.println("Registration         : " + rs.getRegistration());
		System.out.println("Right                : " + rs.getPmRight());
		System.out.println("Promot               : " + rs.getPmPrompt());
		System.out.println("Wrong                : " + rs.getPmWrong());
	}

}
